package com.wwf.sqlsession;

import com.wwf.pojo.Configuration;
import com.wwf.pojo.MappedStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface SqlExecutor {
    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object ... parameters) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InstantiationException, InvocationTargetException, IntrospectionException;
    int insert(Configuration configuration, MappedStatement mappedStatement, Object ... parameters) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException;
    int update(Configuration configuration, MappedStatement mappedStatement, Object ... parameters) throws NoSuchFieldException, SQLException, ClassNotFoundException, IllegalAccessException;
    int deleteById(Configuration configuration, MappedStatement mappedStatement,Object ... parameters) throws SQLException, NoSuchFieldException, ClassNotFoundException, IllegalAccessException;
}
